package com.Test;

import java.util.ArrayList;

public class NewsMgr {
    public static void main(String[] args) {

        ArrayList<NewsTitle> list = new ArrayList<>();
        list.add(new NewsTitle(1, "北京热门景点故宫", "author"));
        list.add(new NewsTitle(2, "北京热门景点长城", "author"));
        list.add(new NewsTitle(3, "北京热门景点北海", "author"));
        list.add(new NewsTitle(4, "北京热门景点颐和园", "author"));
        list.add(new NewsTitle(5, "北京热门景点天安门", "author"));

        // 获取总数
        int size = list.size();
        System.out.println(size);

        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }

    }
}
